package com.gm.hardwarelib.pin;

/**
 * Created by Mouse on 2017/8/19.
 */

public enum NanopcT3UsbHost {

    VDD_5V_1(1, "VDD_5V"),

    VDD_5V_2(2, "VDD_5V"),

    USB_DM4(3, "D4-"),

    USB_DM3(4, "D3-"),

    USB_DP4(5, "D4+"),

    USB_DP3(6, "D3+"),

    DGND_1(7, "DGND"),

    DGND_2(8, "DGND");


    private int num;
    private String name;

    NanopcT3UsbHost(int num, String name) {
        this.num = num;
        this.name = name;
    }

    public static NanopcT3UsbHost valueOf(int num) {
        for (NanopcT3UsbHost v : NanopcT3UsbHost.values()) {
            if (v.num == num) {
                return v;
            }
        }
        throw new IllegalArgumentException();
    }

    public int getNum() {
        return num;
    }

    public String getName() {
        return name;
    }
}
